package com.example.designpatterns.structural.facade;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author zuitu@foxmail.com
 * @date 2024/1/17
 * facade
 */
@Component
public class ComputerFacade {
    @Autowired
    private Computer computer;

    public void turnOn() {
        computer.getElectricShock();
        computer.makeSound();
        computer.showLoadingScreen();
        computer.bam();
    }

    public void turnOff() {
        computer.closeApps();
        computer.closeOS();
    }
}
